import request from '@/utils/request'

// 查询导入列表
export function listImport(query) {
  return request({
    url: '/system/import/list',
    method: 'get',
    params: query
  })
}

// 查询导入详细
export function getImport(id) {
  return request({
    url: '/system/import/' + id,
    method: 'get'
  })
}

// 修改导入数据
export function updateImport(data) {
  return request({
    url: '/system/import',
    method: 'put',
    data: data
  })
}

// 导入数据
export function importData(data) {
  return request({
    url: '/system/import/importData',
    method: 'post',
    data: data
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/system/import/importTemplate',
    method: 'post',
    responseType: 'blob'
  })
}

// 删除导入数据
export function delImport(ids) {
  return request({
    url: '/system/import/' + ids,
    method: 'delete'
  })
}
